package pri.hillchen.springboot.shiro.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import pri.hillchen.springboot.shiro.entity.User;

import java.util.List;
import java.util.Set;

/**
 * Created by hillchen on 2017/9/27.
 */
public interface UserMapper extends BaseMapper<User> {
    User findUserByUserName(@Param("userName") String userName);
    User findUserByUserNamePassword(@Param("userName") String userName, @Param("password") String password);
    List<User> findUserByPage(Pagination page);

    void assignRoles(@Param("userId") Integer userId,@Param("roleIds")Set<Integer> roleIds);
}
